package com.lanou.service.addatrical;

import com.lanou.bean.AddArticalResult;
import com.lanou.bean.RegisterResultBean;
import com.lanou.mapper.addatrical.AddArticalMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by dllo on 18/2/26.
 */
@Component
public class AddArticalServiceImpl implements AddArticalService {
    @Resource
    AddArticalMapper addArticalMapper;

    @Override
    public AddArticalResult addAtrical(String title, String des, String content, int userId) {

        addArticalMapper.addAtrical(title,des,content,userId);

        AddArticalResult resultBean = new AddArticalResult();
        resultBean.setAddResult(true);
        resultBean.setStatue("文章添加成功");
        return resultBean;
    }
}
